//
//  TableViewController.m
//  QQViiew
//
//  Created by liuchengming on 16/10/11.
//  Copyright © 2016年 liuchengming. All rights reserved.
//

#import "TableViewController.h"
#import "Tablecon.h"

@interface TableViewController ()<UISearchResultsUpdating>

@property (strong,nonatomic) UISearchController * searchCon;

@end

@implementation TableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //self.tableView.rowHeight = UITableViewAutomaticDimension;
    //self.tableView.estimatedRowHeight = 60;
    
    _searchCon = [[UISearchController alloc] initWithSearchResultsController:[self.storyboard instantiateViewControllerWithIdentifier:@"searchres"]];
    self.definesPresentationContext = NO;
    self.tableView.tableHeaderView = _searchCon.searchBar;
    self.title = @"联系人";
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"topstyle" forIndexPath:indexPath];

    return cell;
}

- (void)updateSearchResultsForSearchController:(UISearchController *)searchController

{
    
}

@end
